package com.exam.entity;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class BookExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public BookExample() {
        oredCriteria = new ArrayList<>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andBookidIsNull() {
            addCriterion("bookId is null");
            return (Criteria) this;
        }

        public Criteria andBookidIsNotNull() {
            addCriterion("bookId is not null");
            return (Criteria) this;
        }

        public Criteria andBookidEqualTo(Long value) {
            addCriterion("bookId =", value, "bookid");
            return (Criteria) this;
        }

        public Criteria andBookidNotEqualTo(Long value) {
            addCriterion("bookId <>", value, "bookid");
            return (Criteria) this;
        }

        public Criteria andBookidGreaterThan(Long value) {
            addCriterion("bookId >", value, "bookid");
            return (Criteria) this;
        }

        public Criteria andBookidGreaterThanOrEqualTo(Long value) {
            addCriterion("bookId >=", value, "bookid");
            return (Criteria) this;
        }

        public Criteria andBookidLessThan(Long value) {
            addCriterion("bookId <", value, "bookid");
            return (Criteria) this;
        }

        public Criteria andBookidLessThanOrEqualTo(Long value) {
            addCriterion("bookId <=", value, "bookid");
            return (Criteria) this;
        }

        public Criteria andBookidIn(List<Long> values) {
            addCriterion("bookId in", values, "bookid");
            return (Criteria) this;
        }

        public Criteria andBookidNotIn(List<Long> values) {
            addCriterion("bookId not in", values, "bookid");
            return (Criteria) this;
        }

        public Criteria andBookidBetween(Long value1, Long value2) {
            addCriterion("bookId between", value1, value2, "bookid");
            return (Criteria) this;
        }

        public Criteria andBookidNotBetween(Long value1, Long value2) {
            addCriterion("bookId not between", value1, value2, "bookid");
            return (Criteria) this;
        }

        public Criteria andBooknameIsNull() {
            addCriterion("bookName is null");
            return (Criteria) this;
        }

        public Criteria andBooknameIsNotNull() {
            addCriterion("bookName is not null");
            return (Criteria) this;
        }

        public Criteria andBooknameEqualTo(String value) {
            addCriterion("bookName =", value, "bookname");
            return (Criteria) this;
        }

        public Criteria andBooknameNotEqualTo(String value) {
            addCriterion("bookName <>", value, "bookname");
            return (Criteria) this;
        }

        public Criteria andBooknameGreaterThan(String value) {
            addCriterion("bookName >", value, "bookname");
            return (Criteria) this;
        }

        public Criteria andBooknameGreaterThanOrEqualTo(String value) {
            addCriterion("bookName >=", value, "bookname");
            return (Criteria) this;
        }

        public Criteria andBooknameLessThan(String value) {
            addCriterion("bookName <", value, "bookname");
            return (Criteria) this;
        }

        public Criteria andBooknameLessThanOrEqualTo(String value) {
            addCriterion("bookName <=", value, "bookname");
            return (Criteria) this;
        }

        public Criteria andBooknameLike(String value) {
            addCriterion("bookName like", value, "bookname");
            return (Criteria) this;
        }

        public Criteria andBooknameNotLike(String value) {
            addCriterion("bookName not like", value, "bookname");
            return (Criteria) this;
        }

        public Criteria andBooknameIn(List<String> values) {
            addCriterion("bookName in", values, "bookname");
            return (Criteria) this;
        }

        public Criteria andBooknameNotIn(List<String> values) {
            addCriterion("bookName not in", values, "bookname");
            return (Criteria) this;
        }

        public Criteria andBooknameBetween(String value1, String value2) {
            addCriterion("bookName between", value1, value2, "bookname");
            return (Criteria) this;
        }

        public Criteria andBooknameNotBetween(String value1, String value2) {
            addCriterion("bookName not between", value1, value2, "bookname");
            return (Criteria) this;
        }

        public Criteria andBookauthorIsNull() {
            addCriterion("bookAuthor is null");
            return (Criteria) this;
        }

        public Criteria andBookauthorIsNotNull() {
            addCriterion("bookAuthor is not null");
            return (Criteria) this;
        }

        public Criteria andBookauthorEqualTo(String value) {
            addCriterion("bookAuthor =", value, "bookauthor");
            return (Criteria) this;
        }

        public Criteria andBookauthorNotEqualTo(String value) {
            addCriterion("bookAuthor <>", value, "bookauthor");
            return (Criteria) this;
        }

        public Criteria andBookauthorGreaterThan(String value) {
            addCriterion("bookAuthor >", value, "bookauthor");
            return (Criteria) this;
        }

        public Criteria andBookauthorGreaterThanOrEqualTo(String value) {
            addCriterion("bookAuthor >=", value, "bookauthor");
            return (Criteria) this;
        }

        public Criteria andBookauthorLessThan(String value) {
            addCriterion("bookAuthor <", value, "bookauthor");
            return (Criteria) this;
        }

        public Criteria andBookauthorLessThanOrEqualTo(String value) {
            addCriterion("bookAuthor <=", value, "bookauthor");
            return (Criteria) this;
        }

        public Criteria andBookauthorLike(String value) {
            addCriterion("bookAuthor like", value, "bookauthor");
            return (Criteria) this;
        }

        public Criteria andBookauthorNotLike(String value) {
            addCriterion("bookAuthor not like", value, "bookauthor");
            return (Criteria) this;
        }

        public Criteria andBookauthorIn(List<String> values) {
            addCriterion("bookAuthor in", values, "bookauthor");
            return (Criteria) this;
        }

        public Criteria andBookauthorNotIn(List<String> values) {
            addCriterion("bookAuthor not in", values, "bookauthor");
            return (Criteria) this;
        }

        public Criteria andBookauthorBetween(String value1, String value2) {
            addCriterion("bookAuthor between", value1, value2, "bookauthor");
            return (Criteria) this;
        }

        public Criteria andBookauthorNotBetween(String value1, String value2) {
            addCriterion("bookAuthor not between", value1, value2, "bookauthor");
            return (Criteria) this;
        }

        public Criteria andBookpublishIsNull() {
            addCriterion("bookPublish is null");
            return (Criteria) this;
        }

        public Criteria andBookpublishIsNotNull() {
            addCriterion("bookPublish is not null");
            return (Criteria) this;
        }

        public Criteria andBookpublishEqualTo(String value) {
            addCriterion("bookPublish =", value, "bookpublish");
            return (Criteria) this;
        }

        public Criteria andBookpublishNotEqualTo(String value) {
            addCriterion("bookPublish <>", value, "bookpublish");
            return (Criteria) this;
        }

        public Criteria andBookpublishGreaterThan(String value) {
            addCriterion("bookPublish >", value, "bookpublish");
            return (Criteria) this;
        }

        public Criteria andBookpublishGreaterThanOrEqualTo(String value) {
            addCriterion("bookPublish >=", value, "bookpublish");
            return (Criteria) this;
        }

        public Criteria andBookpublishLessThan(String value) {
            addCriterion("bookPublish <", value, "bookpublish");
            return (Criteria) this;
        }

        public Criteria andBookpublishLessThanOrEqualTo(String value) {
            addCriterion("bookPublish <=", value, "bookpublish");
            return (Criteria) this;
        }

        public Criteria andBookpublishLike(String value) {
            addCriterion("bookPublish like", value, "bookpublish");
            return (Criteria) this;
        }

        public Criteria andBookpublishNotLike(String value) {
            addCriterion("bookPublish not like", value, "bookpublish");
            return (Criteria) this;
        }

        public Criteria andBookpublishIn(List<String> values) {
            addCriterion("bookPublish in", values, "bookpublish");
            return (Criteria) this;
        }

        public Criteria andBookpublishNotIn(List<String> values) {
            addCriterion("bookPublish not in", values, "bookpublish");
            return (Criteria) this;
        }

        public Criteria andBookpublishBetween(String value1, String value2) {
            addCriterion("bookPublish between", value1, value2, "bookpublish");
            return (Criteria) this;
        }

        public Criteria andBookpublishNotBetween(String value1, String value2) {
            addCriterion("bookPublish not between", value1, value2, "bookpublish");
            return (Criteria) this;
        }

        public Criteria andBookpageIsNull() {
            addCriterion("bookPage is null");
            return (Criteria) this;
        }

        public Criteria andBookpageIsNotNull() {
            addCriterion("bookPage is not null");
            return (Criteria) this;
        }

        public Criteria andBookpageEqualTo(Integer value) {
            addCriterion("bookPage =", value, "bookpage");
            return (Criteria) this;
        }

        public Criteria andBookpageNotEqualTo(Integer value) {
            addCriterion("bookPage <>", value, "bookpage");
            return (Criteria) this;
        }

        public Criteria andBookpageGreaterThan(Integer value) {
            addCriterion("bookPage >", value, "bookpage");
            return (Criteria) this;
        }

        public Criteria andBookpageGreaterThanOrEqualTo(Integer value) {
            addCriterion("bookPage >=", value, "bookpage");
            return (Criteria) this;
        }

        public Criteria andBookpageLessThan(Integer value) {
            addCriterion("bookPage <", value, "bookpage");
            return (Criteria) this;
        }

        public Criteria andBookpageLessThanOrEqualTo(Integer value) {
            addCriterion("bookPage <=", value, "bookpage");
            return (Criteria) this;
        }

        public Criteria andBookpageIn(List<Integer> values) {
            addCriterion("bookPage in", values, "bookpage");
            return (Criteria) this;
        }

        public Criteria andBookpageNotIn(List<Integer> values) {
            addCriterion("bookPage not in", values, "bookpage");
            return (Criteria) this;
        }

        public Criteria andBookpageBetween(Integer value1, Integer value2) {
            addCriterion("bookPage between", value1, value2, "bookpage");
            return (Criteria) this;
        }

        public Criteria andBookpageNotBetween(Integer value1, Integer value2) {
            addCriterion("bookPage not between", value1, value2, "bookpage");
            return (Criteria) this;
        }

        public Criteria andBookpriceIsNull() {
            addCriterion("bookPrice is null");
            return (Criteria) this;
        }

        public Criteria andBookpriceIsNotNull() {
            addCriterion("bookPrice is not null");
            return (Criteria) this;
        }

        public Criteria andBookpriceEqualTo(Double value) {
            addCriterion("bookPrice =", value, "bookprice");
            return (Criteria) this;
        }

        public Criteria andBookpriceNotEqualTo(Double value) {
            addCriterion("bookPrice <>", value, "bookprice");
            return (Criteria) this;
        }

        public Criteria andBookpriceGreaterThan(Double value) {
            addCriterion("bookPrice >", value, "bookprice");
            return (Criteria) this;
        }

        public Criteria andBookpriceGreaterThanOrEqualTo(Double value) {
            addCriterion("bookPrice >=", value, "bookprice");
            return (Criteria) this;
        }

        public Criteria andBookpriceLessThan(Double value) {
            addCriterion("bookPrice <", value, "bookprice");
            return (Criteria) this;
        }

        public Criteria andBookpriceLessThanOrEqualTo(Double value) {
            addCriterion("bookPrice <=", value, "bookprice");
            return (Criteria) this;
        }

        public Criteria andBookpriceIn(List<Double> values) {
            addCriterion("bookPrice in", values, "bookprice");
            return (Criteria) this;
        }

        public Criteria andBookpriceNotIn(List<Double> values) {
            addCriterion("bookPrice not in", values, "bookprice");
            return (Criteria) this;
        }

        public Criteria andBookpriceBetween(Double value1, Double value2) {
            addCriterion("bookPrice between", value1, value2, "bookprice");
            return (Criteria) this;
        }

        public Criteria andBookpriceNotBetween(Double value1, Double value2) {
            addCriterion("bookPrice not between", value1, value2, "bookprice");
            return (Criteria) this;
        }

        public Criteria andCreatetimeIsNull() {
            addCriterion("createTime is null");
            return (Criteria) this;
        }

        public Criteria andCreatetimeIsNotNull() {
            addCriterion("createTime is not null");
            return (Criteria) this;
        }

        public Criteria andCreatetimeEqualTo(Date value) {
            addCriterion("createTime =", value, "createtime");
            return (Criteria) this;
        }

        public Criteria andCreatetimeNotEqualTo(Date value) {
            addCriterion("createTime <>", value, "createtime");
            return (Criteria) this;
        }

        public Criteria andCreatetimeGreaterThan(Date value) {
            addCriterion("createTime >", value, "createtime");
            return (Criteria) this;
        }

        public Criteria andCreatetimeGreaterThanOrEqualTo(Date value) {
            addCriterion("createTime >=", value, "createtime");
            return (Criteria) this;
        }

        public Criteria andCreatetimeLessThan(Date value) {
            addCriterion("createTime <", value, "createtime");
            return (Criteria) this;
        }

        public Criteria andCreatetimeLessThanOrEqualTo(Date value) {
            addCriterion("createTime <=", value, "createtime");
            return (Criteria) this;
        }

        public Criteria andCreatetimeIn(List<Date> values) {
            addCriterion("createTime in", values, "createtime");
            return (Criteria) this;
        }

        public Criteria andCreatetimeNotIn(List<Date> values) {
            addCriterion("createTime not in", values, "createtime");
            return (Criteria) this;
        }

        public Criteria andCreatetimeBetween(Date value1, Date value2) {
            addCriterion("createTime between", value1, value2, "createtime");
            return (Criteria) this;
        }

        public Criteria andCreatetimeNotBetween(Date value1, Date value2) {
            addCriterion("createTime not between", value1, value2, "createtime");
            return (Criteria) this;
        }
    }

    /**
     */
    public static class Criteria extends GeneratedCriteria {
        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}